#!/usr/bin/env python
# -*- encoding: utf-8 -*-
'''
@File    :   contraband_test.py    
@Contact :   fengfeng.qiu@amh-group.com

@Modify Time      @Author    
------------      -------    
2022/3/25 15:54   qiufengfeng      
'''
import requests

data = {"dialogue": [[
            "D:喂。",
            "S:嗯。",
            "D:从那个邢台沙河拉汽油这个到这个临清嘞。",
            "D:那不好装车。"
        ]]}
header = {"Content-Type": "application/json"}
import json
import time
start_time = time.time()
for i in range(100):
    req = requests.post("http://predict-phantom.amh-group.com/contraband/v1/models/contraband:predict", data=json.dumps(data), headers=header)
    print(req.status_code)
end_time = time.time()
print("time cost:"+ str(end_time - start_time))